<template>
    <el-container>
        <el-header>洋洋车业</el-header>
        <el-container>
            <el-aside width="200px">
                <el-menu default-active="2" class="el-menu-vertical-demo" :router="true" @open="handleOpen"
                    @close="handleClose" background-color="#545c64" text-color="#fff" active-text-color="#ffd04b">
                    <el-menu-item index="home">
                        <i class="el-icon-s-data"></i>
                        <span slot="title">首页</span>
                    </el-menu-item>
                    <el-menu-item index="2">
                        <i class="el-icon-menu"></i>
                        <span slot="title">导航二</span>
                    </el-menu-item>
                    <el-menu-item index="home">选项1</el-menu-item>
                        <el-menu-item index="/">选项2</el-menu-item>
                        <el-menu-item index="1-3">选项3</el-menu-item>
                </el-menu>
            </el-aside>
            <el-main>               
                <router-view/>
            </el-main>
        </el-container>
    </el-container>
</template>

<script>

export default {
    name: "Index",
    components: {

    },
    data() {
        return {
            str: '洋洋'
        }
    },
    methods: {
        handleOpen(key, keyPath) {
            console.log(key, keyPath);
        },
        handleClose(key, keyPath) {
            console.log(key, keyPath);
        }
    }
}
</script>

<style scoped>
.el-header {
    background-color: #B3C0D1;
    color: #333;
    line-height: 60px;
}

.el-aside {
    color: #333;
    height: 100%;
}
.el-container{
    height: 100%;
}
</style>